<template>
	<view class="goods_item">
		<image :src="item.img_url" mode=""></image>
		<view class="goods_de">
			<text class="goods_title">{{item.goods_title}}</text>
			<view class="specification">
				￥22/900g
			</view>

			<view class="goods_num">
				<view class="adjustment_num">
					<button>-</button>
					<input :value="1" type="number" />
					<button>+</button>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		name: "main-goods",
		data() {
			return {

			};
		},
		props: ['item'],
		created() {
			// console.log(this.item);
		}
	}
</script>

<style lang="scss">
	.goods_item {
		border-radius: 10rpx;
		background-color: #fff;
		width: 340rpx;
		position: relative;
		padding-bottom: 16rpx;
		overflow: hidden;
		margin-bottom: 30rpx;

		image {
			width: 340rpx;
			// display: block;
			height: 340rpx;
		}

		.goods_title {
			font-size: 26rpx;
			line-height: 30rpx;
			display: block;
			// margin-bottom: 36rpx;
		}

		.specification {
			font-size: 30rpx;
			font-family: PingFang SC, PingFang SC;
			font-weight: 800;
			color: #F44236;
		}

		.goods_num {
			display: flex;
			justify-content: center;

			.adjustment_num {
				display: flex;
				align-items: center;
				width: 216rpx;

				button {
					background-color: transparent;
					padding: 0;
					border: 0;
					color: #777777;
					font-size: 44rpx;

					&::after {
						border: 0;
					}
				}

				input {
					background-color: #FF594D;
					border-radius: 55rpx;
					width: 116rpx;
					height: 51rpx;
					color: #fff;
					text-align: center;
					padding: 0;
					margin: 0 10rpx;
					position: relative;
					z-index: 0;
				}
			}
		}

		.goods_de {
			padding: 0 10rpx;
		}

	}
</style>